home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr35 / sbbsvol1.zip / EXEC.ZIP / SBBSQNET.SCR < prev    next >
Text File  |  1993-06-02  |  2KB  |  92 lines

  1. ;Logon to Synchronet and transfer QWK packets using Zmodem
  2. ;This script file is for use with Qmodem!
  3. GRAPHICS ANSI
  4. TURNOFF NOISE
  5. STRING SYSNAME PHONE ACCOUNT PASS RETRY DATADIR REP QWK INFO
  6.  
  7. ASSIGN SYSNAME "XXXX"                  ; System being called
  8. ASSIGN PHONE "XXXXXXX^M"               ; System phone number
  9. ASSIGN ACCOUNT "XXXXXX^M"              ; Account on system
  10. ASSIGN PASS "XXXXXXXX^M"               ; Password
  11. ASSIGN RETRY "20"                      ; # of times to retry
  12. ASSIGN DATADIR "\SYNCHRO\DATA"         ; Download directory
  13. ASSIGN REP "$DATADIR\$SYSNAME.REP"     ; REP is the name of the REPLY packet
  14. ASSIGN QWK "$DATADIR\$SYSNAME.QWK"     ; QWK is the name of the QWK packet
  15. ASSIGN INFO "$DATADIR\$SYSNAME.LOG"    ; INFO is the name of the LOG file
  16.  
  17.  
  18.  
  19. CLRSCR                                  ; Clear the screen
  20.  
  21. LOG $INFO                               ; Open the log file
  22. STAMP Qmodem QWK log opened
  23. DISPLAYLN "SBBSQNET: Initialized "      ; Display this line
  24.  
  25. DISPLAYLN "SBBSQNET: Calling $SYSNAME"  ; Information line
  26. STAMP Calling $SYSNAME
  27.  
  28. DISPLAYLN "SBBSQNET: Dialing $PHONE"    ; Information line
  29. DELAY 1000
  30. SEND "ATM0^M"
  31.         WHEN "BUSY" LOOP
  32.         WHEN "NO DIAL TONE" LOOP
  33.         TIMEOUT 45 LOOP
  34.  
  35. LOOP:
  36.         DECR RETRY
  37.         IF "$RETRY" = "0" ENDQWK
  38.         DELAY 1000
  39.         SEND "ATDT $PHONE"
  40.         WAITFOR "CONNECT"
  41.         DELAY 2000
  42.         IF $ONLINE DONE
  43.  
  44. GOTO LOOP
  45.  
  46. DONE:
  47.  
  48. TIMEOUT 600 ENDQWK                      ; wait up to 10 minutes for sucess
  49. WHEN "HIT A KEY" "^M"
  50. WAITFOR "NN:"
  51. SEND    "^M"
  52. WAITFOR "NN:"
  53. SEND    "$ACCOUNT"
  54. DELAY   100
  55. WAITFOR "PW:"
  56. SEND    "$PASS"
  57. WAITFOR "QWK:"
  58.  
  59. EXIST $REP UPREP                        ; If the reply exists, send it
  60.  
  61. RECEIVE:
  62.         STAMP Download QWK packet
  63.         DELAY 1000
  64.         SEND "DL"
  65.         WHEN "No New Messages" ENDQWK
  66.         WAITFOR "PROTOCOL"
  67.         SEND "ZN"
  68.         DOWNLOAD Z $QWK
  69.         WAITFOR "QWK:"
  70.         SEND "Q"
  71.  
  72. ENDQWK:
  73.         SEND "Q"
  74.         HANGUP
  75.         STAMP Qmodem QWK log closed
  76.         TURNOFF LOG
  77.         SYSTEM X
  78.  
  79. UPREP:
  80.         STAMP Upload REPly packet
  81.         DELAY 1000
  82.         SEND "UZN"
  83.         WAITFOR "Start Transfer Now"
  84.         UPLOAD Z $REP
  85.         IF $SUCCESS DELREP
  86.         GOTO RECEIVE
  87.  
  88. DELREP:
  89.         DOS "del $REP^M"
  90.         WAITFOR "QWK:"
  91.         GOTO RECEIVE
  92.